<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>

<body>
<div id="tree" class="tree-height"></div>
</body>
<script type="text/javascript">
var tree;
$(document).ready(function(){
	tree = $('#tree').tree({
		data : 
		[
		{"id":"1", "text":"所有系统","leaf":false,"href":"", children : [
			{"id":"2","text":"SAAS-RES","leaf":false,"leaf":true,"href":""}
			,{"id":"3","text":"SAAS-BOSS","leaf":false,"leaf":true,"href":""}
			,{"id":"4","text":"M-BOSS","leaf":false,"leaf":true,"href":""}
			,{"id":"5","text":"院线2.0","leaf":false,"leaf":true,"href":""}
			,{"id":"6","text":"院线2.1","leaf":false,"leaf":true,"href":""}
			,{"id":"7","text":"GMS","leaf":false,"leaf":true,"href":""}
			,{"id":"8","text":"HR","leaf":false,"leaf":true,"href":""}
			,{"id":"9","text":"OA","leaf":false,"leaf":true,"href":""}
		]}
		
		]
		,hrefTarget : 'content'
	    ,contextMenu : [
			{text: '新增',icon: 'images/ico-add.gif'
			,handler: function(e){
				var node = tree.getSelectedNode();
				alert( '新增');
			}}
			,{text: '修改',icon: 'images/ico-add.gif'
			,handler: function(e){
				var node = tree.getSelectedNode();
				alert( '修改,选择的ID = ' + node.data.id);
			}}
			,{text: '查看',icon: 'images/ico-add.gif'
				,handler: function(e){
					var node = tree.getSelectedNode();
					alert( '查看,选择的text = ' + node.data.text);
				}
				,menu:[{text: '查看-1',icon: 'images/ico-add.gif'
					,handler: function(e){
						var node = tree.getSelectedNode();
						alert( '查看,选择的text = ' + node.data.text);
					}}
					,{text: '查看-2',icon: 'images/ico-add.gif'
					,handler: function(e){
						var node = tree.getSelectedNode();
						alert( '查看,选择的text = ' + node.data.text);
					}}
					,{text: '查看-3',icon: 'images/ico-add.gif'
					,handler: function(e){
						var node = tree.getSelectedNode();
						alert( '查看,选择的text = ' + node.data.text);
					}}
				]
			}
			]
	});
	
});
</script>
</html>
